package br.net.atasacramental.reuniao.business;
/**
 * @author root
 */
import br.net.atasacramental.reuniao.dao.ReuniaoDAO;
import br.net.atasacramental.reuniao.model.Reuniao;
import br.net.atasacramental.util.Paginacao;

import java.util.Date;
import java.util.List;

import under.wsl.service.Service;
public class ReuniaoBLL {
    private ReuniaoDAO dao = null;
    public ReuniaoBLL() {
        this.dao=new ReuniaoDAO();
    }  
    @Service(cache=false)
    public List<Reuniao> getPaginado(Paginacao p){
        return this.dao.getPaginado(p);
    }
    @Service(cache=true)
    public List<Reuniao> get(){
        return this.dao.get();
    }
    @Service()
    public Reuniao getByIdReuniao(int idReuniao){
        return this.dao.getByIdReuniao(idReuniao);
    }
    @Service()
    public List<Reuniao> getByPeriodo(Date dtaI,Date dtaF){
        return this.dao.getByPeriodo(dtaI, dtaF);
    }     
    @Service()
    public List<Reuniao> getByPeriodoSemDiscursante(Date dtaI,Date dtaF){
        return this.dao.getByPeriodoSemDiscursante(dtaI, dtaF);
    }  
    @Service(remove={"ReuniaoBLL.get"})
    public int insert(Reuniao ren){
        this.dao.insert(ren);
        return ren.getIdReuniao();
    }
    @Service(remove={"ReuniaoBLL.get"})
    public boolean update(Reuniao ren){
        return this.dao.update(ren);
    }
}
